﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Kinect;

namespace KinectMenagerNamespace.KinectGestureParts
{
    class RightHandAboveHead : TimeDependentKinectGesturePart
    {
        public RightHandAboveHead()
            : base()
        {
        }

        public RightHandAboveHead(TimeSpan maxDuration)
            : base(maxDuration)
        {
        }

        public override GestureState TimeDependentUpdate(Skeleton skeleton)
        {
            if (skeleton.Joints[JointType.HandRight].Position.Y > skeleton.Joints[JointType.Head].Position.Y)
            {
                return GestureState.Succes;
            }
            else
            {
                return GestureState.InProgress;
            }
        }
    }
}
